<template>
  <div class="listview">
    <slot>
      <div class="list_content">
        <el-row class="list_recode" v-for="(recode, index) in messageData" :key="index">
          <el-col :span="15" :offset="1">
            <div class="recode">
              <span class="is_new" v-if="recode.isNew">new</span>
              <span>{{recode.content}}</span>
            </div>
          </el-col>
          <el-col :span="6" :offset="1">
            <div class="recode_time">
              <span>{{recode.time}}</span>
            </div>
          </el-col>
        </el-row>
      </div>
    </slot>
  </div>
</template>
<script>
export default {
  name: 'mainListView',
  props: ['messageData'],
  data () {
    return {

    }
  }
}
</script>
<style lang="scss">
.listview {
  min-width: 510px;
  .list_content {
    background: #ffffff;
    font-size: 14px;
    color: #282830;
    line-height: 16px;
    padding: 10px 0;
    .list_recode {
      padding: 10px 0;
      .recode {
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        .is_new {
          background-image: linear-gradient(-263deg, #d9180f 0%, #ff7661 100%);
          border-radius: 2px;
          padding: 0 5px;
          margin-right: 5px;
          color: #ffffff;
        }
      }
      .recode_time {
        text-align: right;
        font-size: 11px;
      }
    }
  }
  .el-table__row td {
    border: 0;
  }
}
</style>
